Get extrema
Finds extreme pixel values in the image.
getExtrema, as the name suggests, finds extreme intensity values of the image. If user looks for minimum values it finds the darkest points, when maximum - the brightest.
The principle is straight-forward: the function iterates through each point and compares values around it. If all the values around point in question is smaller then the point is considered a minimum. Same algorithm for maximum values.
info
By choosing different algorithm option you can change the size of the neighboring area where the extrema is search.
tip
You can add a mask as an option to specify locations where to look for extrema.
| Minimum | Maximum |
|---|---|
![]() | ![]() |
Parameters and default values
imageoptions
Options
| Property | Required | Default value |
|---|---|---|
kind | no | 'maximum' |
mask | no | - |
algorithm | no | star |
maxEquals | no | 2 |

